Skip to main content

All Questions

2votes
3answers
553views

Recursive palindrome check

I'm trying to solve this which basically calls for a recursive palindrome check with some minor extra steps (Special characters and whitespace can be ignored). The test inputs' length can be 100000 ...
Yamin Siahmargooei's user avatar
4votes
1answer
330views

Leetcode, longest palindromic substring

Here's a link Given a string s, return the longest palindromic substring in s. A string is called a palindrome string if the reverse of that string is the same as the original string. Example 1: ...
watch-this's user avatar
3votes
3answers
1kviews

The largest palindrome made from the product of two 3-digit numbers

Problem description: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the ...
Amir Motefaker's user avatar
1vote
3answers
686views

Finding n-th smallest Palindrome number (where 1<=n<=5000 and the palindrome number must have odd number of digits)

I am working on this code from 3 days from a website called Codechef, the code compiles, executes and even give correct results but my code is taking 1.01 sec, but the time limit for question is 1sec,...
Prince's user avatar
3votes
1answer
131views

palindrome code in C times out in program challenge?

Hello I am making a code in C to find the value of the last sequence of palindromes of a specified size (d) and I need to optimize this code as it is for an ...
Yuri Nogueira Moreira da Silva's user avatar
9votes
1answer
2kviews

LeetCode on Longest Palindromic Substring in Python

This is a programming question from LeetCode: Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Note: "aba" is ...
user avatar
4votes
4answers
1kviews

Check if a binary tree is symmetric in Python

I have solved the following Leetcode problem. Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric....
user82261's user avatar
3votes
1answer
696views

Optimizing code solution for Palindrome Index-Hackerrank

I submitted my solution for palindrome Index coding challenge but I get "test cases terminated due to time out error". My code is working and so I don't know what else to do to optimize it. Please ...
R. Wanjohi's user avatar
2votes
1answer
167views

How do I optimize memoization in order to find longest palindromic substring?

I want to find the longest palindromic substring using dynamic programming in Python3. The strings can be as large as this string. I have seen other questions on this problem that successfully solve ...
Aviral Srivastava's user avatar
3votes
0answers
235views

Longest palindrome code in C# takes time out on LeetCode

I like to request a review of the code below, which is my attempt at answering the question here on LeetCode site. The code passes 43 tests, but it times out on the next one. I copied and ran the test ...
Shahin's user avatar
3votes
1answer
282views

Project Euler - Problem No.4 - Largest palindrome product

according to the problem: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made ...
Omri Shneor's user avatar
3votes
2answers
706views

Calculate the largest palindromic number from the product of two 6-digit numbers (100000 to 999999)

Are there any efficient ways to solve this problem, for example using bitwise operator? ...
Selman Keskin's user avatar
6votes
1answer
408views

Palindrome insertion challenge

Here is my solution to the following Daily Coding Problem challenge: Given a string, find the palindrome that can be made by inserting the fewest number of characters as possible anywhere in the word....
MrJoe's user avatar
  • 2,133
1vote
1answer
248views

Palindrome Pairs

The task is taken from leetcode Given a list of unique words, find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + words[j] ...
thadeuszlay's user avatar
4votes
4answers
297views

Largest Palindrome Product - Project Euler #4

This is my code for Project Euler Problem #4 The question: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find ...
Eagle's user avatar

153050per page
close